#ifndef REQUIREMENT_DETAIL_WIDGET_H
#define REQUIREMENT_DETAIL_WIDGET_H

#include <QWidget>

namespace Ui {
class RequirementDetailWidget;
}

class RequirementDetailWidget : public QWidget
{
    Q_OBJECT

public:
    explicit RequirementDetailWidget(QWidget *parent = nullptr);
    ~RequirementDetailWidget();
    void setRequirementUuid(QString uuid);

private:
    void initUi();
    void initEvents();
    void initRequirementData(QString uuid);
    void initAssociateTasks(QString requirementUuid);
    void addNewAssociateTaskListItem(QString text, QString uuid, QString requirement_uuid, QString task_uuid);
    void initIcon();
    void setRequirementIterator(QString iterator);

private slots:
    void onSaveBtnClicked();
    void onAssociateTaskBtnClicked();

private:
    Ui::RequirementDetailWidget *ui;
    QString                      m_requirementUuid;
    QString                      m_prjUuid;
};

#endif // REQUIREMENT_DETAIL_WIDGET_H
